Skip to content

Conversation

@innocenzi
Copy link
Member

This pull request adds a $query parameter to route testing utils, which allows to do this:

$this->http
    ->get("/oauth/discord/callback", query: [
        'code' => 'some-fake-code',
        'state' => $oauth->getState(),
    ])
    ->assertRedirect();

Instead of having to do this:

$this->http
    ->get("/oauth/discord/callback?code=some-fake-code&state={$oauth->getState()}")
    ->assertRedirect();

@innocenzi innocenzi changed the title feat(http): add query parameter to route testing utilities feat(http)!: add query parameter to route testing utilities Oct 1, 2025
@innocenzi innocenzi marked this pull request as draft October 1, 2025 13:57
@innocenzi innocenzi marked this pull request as ready for review October 1, 2025 14:21
@innocenzi innocenzi requested a review from brendt October 1, 2025 14:34
@brendt
Copy link
Member

brendt commented Oct 2, 2025

Technically this is a breaking change because the $headers array shifted position. I do think most people use named parameters though, so I'm fine merging this.

@brendt brendt merged commit a819979 into main Oct 2, 2025
79 checks passed
@brendt brendt deleted the feat/http-testing-utils branch October 2, 2025 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants